Optimal. Leaf size=80 \[ \frac{1}{2} c^2 \left (a+b \tanh ^{-1}(c x)\right )^2-\frac{\left (a+b \tanh ^{-1}(c x)\right )^2}{2 x^2}-\frac{b c \left (a+b \tanh ^{-1}(c x)\right )}{x}-\frac{1}{2} b^2 c^2 \log \left (1-c^2 x^2\right )+b^2 c^2 \log (x) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.13302, antiderivative size = 80, normalized size of antiderivative = 1., number of steps used = 8, number of rules used = 7, integrand size = 14, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.5, Rules used = {5916, 5982, 266, 36, 29, 31, 5948} \[ \frac{1}{2} c^2 \left (a+b \tanh ^{-1}(c x)\right )^2-\frac{\left (a+b \tanh ^{-1}(c x)\right )^2}{2 x^2}-\frac{b c \left (a+b \tanh ^{-1}(c x)\right )}{x}-\frac{1}{2} b^2 c^2 \log \left (1-c^2 x^2\right )+b^2 c^2 \log (x) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 5916
Rule 5982
Rule 266
Rule 36
Rule 29
Rule 31
Rule 5948
Rubi steps
\begin{align*} \int \frac{\left (a+b \tanh ^{-1}(c x)\right )^2}{x^3} \, dx &=-\frac{\left (a+b \tanh ^{-1}(c x)\right )^2}{2 x^2}+(b c) \int \frac{a+b \tanh ^{-1}(c x)}{x^2 \left (1-c^2 x^2\right )} \, dx\\ &=-\frac{\left (a+b \tanh ^{-1}(c x)\right )^2}{2 x^2}+(b c) \int \frac{a+b \tanh ^{-1}(c x)}{x^2} \, dx+\left (b c^3\right ) \int \frac{a+b \tanh ^{-1}(c x)}{1-c^2 x^2} \, dx\\ &=-\frac{b c \left (a+b \tanh ^{-1}(c x)\right )}{x}+\frac{1}{2} c^2 \left (a+b \tanh ^{-1}(c x)\right )^2-\frac{\left (a+b \tanh ^{-1}(c x)\right )^2}{2 x^2}+\left (b^2 c^2\right ) \int \frac{1}{x \left (1-c^2 x^2\right )} \, dx\\ &=-\frac{b c \left (a+b \tanh ^{-1}(c x)\right )}{x}+\frac{1}{2} c^2 \left (a+b \tanh ^{-1}(c x)\right )^2-\frac{\left (a+b \tanh ^{-1}(c x)\right )^2}{2 x^2}+\frac{1}{2} \left (b^2 c^2\right ) \operatorname{Subst}\left (\int \frac{1}{x \left (1-c^2 x\right )} \, dx,x,x^2\right )\\ &=-\frac{b c \left (a+b \tanh ^{-1}(c x)\right )}{x}+\frac{1}{2} c^2 \left (a+b \tanh ^{-1}(c x)\right )^2-\frac{\left (a+b \tanh ^{-1}(c x)\right )^2}{2 x^2}+\frac{1}{2} \left (b^2 c^2\right ) \operatorname{Subst}\left (\int \frac{1}{x} \, dx,x,x^2\right )+\frac{1}{2} \left (b^2 c^4\right ) \operatorname{Subst}\left (\int \frac{1}{1-c^2 x} \, dx,x,x^2\right )\\ &=-\frac{b c \left (a+b \tanh ^{-1}(c x)\right )}{x}+\frac{1}{2} c^2 \left (a+b \tanh ^{-1}(c x)\right )^2-\frac{\left (a+b \tanh ^{-1}(c x)\right )^2}{2 x^2}+b^2 c^2 \log (x)-\frac{1}{2} b^2 c^2 \log \left (1-c^2 x^2\right )\\ \end{align*}
Mathematica [A] time = 0.0676631, size = 101, normalized size = 1.26 \[ -\frac{a^2+b c^2 x^2 (a+b) \log (1-c x)-b c^2 x^2 (a-b) \log (c x+1)+2 a b c x+2 b \tanh ^{-1}(c x) (a+b c x)-2 b^2 c^2 x^2 \log (x)-b^2 \left (c^2 x^2-1\right ) \tanh ^{-1}(c x)^2}{2 x^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.019, size = 253, normalized size = 3.2 \begin{align*} -{\frac{{a}^{2}}{2\,{x}^{2}}}-{\frac{{b}^{2} \left ({\it Artanh} \left ( cx \right ) \right ) ^{2}}{2\,{x}^{2}}}-{\frac{c{b}^{2}{\it Artanh} \left ( cx \right ) }{x}}-{\frac{{c}^{2}{b}^{2}{\it Artanh} \left ( cx \right ) \ln \left ( cx-1 \right ) }{2}}+{\frac{{c}^{2}{b}^{2}{\it Artanh} \left ( cx \right ) \ln \left ( cx+1 \right ) }{2}}-{\frac{{c}^{2}{b}^{2} \left ( \ln \left ( cx-1 \right ) \right ) ^{2}}{8}}+{\frac{{c}^{2}{b}^{2}\ln \left ( cx-1 \right ) }{4}\ln \left ({\frac{1}{2}}+{\frac{cx}{2}} \right ) }-{\frac{{c}^{2}{b}^{2}\ln \left ( cx-1 \right ) }{2}}+{c}^{2}{b}^{2}\ln \left ( cx \right ) -{\frac{{c}^{2}{b}^{2}\ln \left ( cx+1 \right ) }{2}}-{\frac{{c}^{2}{b}^{2}}{4}\ln \left ( -{\frac{cx}{2}}+{\frac{1}{2}} \right ) \ln \left ({\frac{1}{2}}+{\frac{cx}{2}} \right ) }+{\frac{{c}^{2}{b}^{2}\ln \left ( cx+1 \right ) }{4}\ln \left ( -{\frac{cx}{2}}+{\frac{1}{2}} \right ) }-{\frac{{c}^{2}{b}^{2} \left ( \ln \left ( cx+1 \right ) \right ) ^{2}}{8}}-{\frac{ab{\it Artanh} \left ( cx \right ) }{{x}^{2}}}-{\frac{abc}{x}}-{\frac{{c}^{2}ab\ln \left ( cx-1 \right ) }{2}}+{\frac{{c}^{2}ab\ln \left ( cx+1 \right ) }{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] time = 1.00399, size = 204, normalized size = 2.55 \begin{align*} \frac{1}{2} \,{\left ({\left (c \log \left (c x + 1\right ) - c \log \left (c x - 1\right ) - \frac{2}{x}\right )} c - \frac{2 \, \operatorname{artanh}\left (c x\right )}{x^{2}}\right )} a b + \frac{1}{8} \,{\left ({\left (2 \,{\left (\log \left (c x - 1\right ) - 2\right )} \log \left (c x + 1\right ) - \log \left (c x + 1\right )^{2} - \log \left (c x - 1\right )^{2} - 4 \, \log \left (c x - 1\right ) + 8 \, \log \left (x\right )\right )} c^{2} + 4 \,{\left (c \log \left (c x + 1\right ) - c \log \left (c x - 1\right ) - \frac{2}{x}\right )} c \operatorname{artanh}\left (c x\right )\right )} b^{2} - \frac{b^{2} \operatorname{artanh}\left (c x\right )^{2}}{2 \, x^{2}} - \frac{a^{2}}{2 \, x^{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 2.36725, size = 300, normalized size = 3.75 \begin{align*} \frac{8 \, b^{2} c^{2} x^{2} \log \left (x\right ) + 4 \,{\left (a b - b^{2}\right )} c^{2} x^{2} \log \left (c x + 1\right ) - 4 \,{\left (a b + b^{2}\right )} c^{2} x^{2} \log \left (c x - 1\right ) - 8 \, a b c x +{\left (b^{2} c^{2} x^{2} - b^{2}\right )} \log \left (-\frac{c x + 1}{c x - 1}\right )^{2} - 4 \, a^{2} - 4 \,{\left (b^{2} c x + a b\right )} \log \left (-\frac{c x + 1}{c x - 1}\right )}{8 \, x^{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 1.45457, size = 126, normalized size = 1.58 \begin{align*} \begin{cases} - \frac{a^{2}}{2 x^{2}} + a b c^{2} \operatorname{atanh}{\left (c x \right )} - \frac{a b c}{x} - \frac{a b \operatorname{atanh}{\left (c x \right )}}{x^{2}} + b^{2} c^{2} \log{\left (x \right )} - b^{2} c^{2} \log{\left (x - \frac{1}{c} \right )} + \frac{b^{2} c^{2} \operatorname{atanh}^{2}{\left (c x \right )}}{2} - b^{2} c^{2} \operatorname{atanh}{\left (c x \right )} - \frac{b^{2} c \operatorname{atanh}{\left (c x \right )}}{x} - \frac{b^{2} \operatorname{atanh}^{2}{\left (c x \right )}}{2 x^{2}} & \text{for}\: c \neq 0 \\- \frac{a^{2}}{2 x^{2}} & \text{otherwise} \end{cases} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{{\left (b \operatorname{artanh}\left (c x\right ) + a\right )}^{2}}{x^{3}}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]